/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package auto.wus;

import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import polaczenie.polacz;
//import sun.util.calendar.CalendarDate;
import java.util.GregorianCalendar;
import org.quartz.CronTrigger;
import java.text.DateFormat;

import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.SimpleTrigger;
import org.quartz.Trigger;
import org.quartz.impl.StdSchedulerFactory;
/**
 *
 * @author Cyga
 */
public class AutoWus {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws SchedulerException, ParseException {
        // TODO code application logic here
        GregorianCalendar c = new GregorianCalendar();       
        Date d = new Date(c.getTime().getYear(), c.getTime().getMonth(), c.getTime().getDate());
          
         Date b= new Date(c.getTime().getYear(), c.getTime().getMonth(), c.getTime().getDate());
 System.out.println(c.getTime());
c.getTime().setHours(23);
c.getTime().setMinutes(24);
//c.getTime().setDate(21);
     // c.getTime().setHours(1);

//      d.setHours(1);
      
      //d.setMinutes(47);
         polacz p = new polacz();
       p.laczZBD();
      //p.dodajPacjenta(901027112, "arek", "ptak", 2);
       //p.dodajWizyte(6, d,"asd" , 901027112);
       //p.wyswietlWizyty();
       p.wyswietlPacjentow();
     // p.dodajSprawdzenie("9");
 //    System.out.print("sprawdzenie: "+ p.sprawdzPesel("1"));
     
   //  System.out.print("sprawdzenie1: "+ p.sprawdzPesel("90102711210"));
  //p.wyczyscSprawdzenie();
         //p.wyswietlDzisiejsze();

     //    p.wyswietlDzisiejsze();
    System.out.print("wyziyta:"+ p.pobierzPacjenta("901027112").getNazwisko());
    	 Scheduler scheduler =  new StdSchedulerFactory().getScheduler();
                        JobDetail jobDetail = new JobDetail("przykład", null,
                                        Sprawdzanie.class);
                    Trigger trigger = new CronTrigger("simple", null, "40 01 11 ? * *");
                        scheduler.scheduleJob(jobDetail, trigger);     
                        scheduler.start();
    }
}

 
 
